<?php

namespace App\Lib\PHPExcel\ManuOrder;

use App\Lib\PHPExcel\ExcelHandle;

class GoodsCount extends ExcelHandle
{
    /*
     * 产品销量统计
     * */
    public function arrange($origin_arr)
    {

        $arr = [
            0 => [
                 '厂家', '产品', '尺寸' , '颜色' , '销量'
            ]
        ];
        $i = 1;
        foreach ($origin_arr as $data) {
            $arr[$i]['厂家'] = $data['manu_name'];
            $arr[$i]['产品'] = $data['prod_no'];
            $arr[$i]['尺寸'] = $data['size'];
            $arr[$i]['颜色'] = $data['color'];
            $arr[$i]['销量'] = $data['count'];
            $i++;
        }

        return $arr;
    }


}